package com.boot.mall.auth.feign;

import com.boot.common.utils.R;
import com.boot.common.vo.MemberResponseVo;
import com.boot.mall.auth.vo.UserLoginVo;
import com.boot.mall.auth.vo.UserRegisterVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;


@FeignClient("mall-member")
public interface MemberRegisterFeignService {

    // 用户注册
    @PostMapping("/member/member/guli/feign/register")
    R register(@RequestBody UserRegisterVo vo);

    // 用户登录
    @PostMapping("/member/member/guli/feign/login")
    R login(@RequestBody UserLoginVo vo);

    // 微博用户第三方注册
    @PostMapping("/member/member/auth/weibo/register")
    public R weiBoUserAuthRegister(@RequestBody MemberResponseVo vo);

    // 根据用户uid查询数据库中的用户信息
    @GetMapping("/member/member/{uid}/memberInfo")
    public R getMemberInfo(@PathVariable("uid") String uid);

}
